package org.hzero.business.report.dto;


import java.util.List;
import java.util.StringJoiner;

/**
 * 前端要求的报表类型字段
 *
 * @author: tianhao.luo@hand-china.com 2021/2/19  16:13
 */
public class KnifeReportTable<Header, Line> {
    /**
     * 头数据
     */
    private Header detail;
    /**
     * 头报表展示字段
     */
    private List<KnifeReportHeaderColumn> headerColumnList;
    /**
     * 行报表展示字段
     */
    private List<KnifeReportLineColumn> lineColumnList;
    /**
     * 行数据
     */
    private List<Line> lineList;


    public KnifeReportTable(Header detail, List<KnifeReportHeaderColumn> headerColumnList, List<KnifeReportLineColumn> lineColumnList, List<Line> lineList) {
        this.detail = detail;
        this.headerColumnList = headerColumnList;
        this.lineColumnList = lineColumnList;
        this.lineList = lineList;
    }

    public Header getDetail() {
        return detail;
    }

    public void setDetail(Header detail) {
        this.detail = detail;
    }

    public List<KnifeReportHeaderColumn> getHeaderColumnList() {
        return headerColumnList;
    }

    public void setHeaderColumnList(List<KnifeReportHeaderColumn> headerColumnList) {
        this.headerColumnList = headerColumnList;
    }

    public List<KnifeReportLineColumn> getLineColumnList() {
        return lineColumnList;
    }

    public void setLineColumnList(List<KnifeReportLineColumn> lineColumnList) {
        this.lineColumnList = lineColumnList;
    }

    public List<Line> getLineList() {
        return lineList;
    }

    public void setLineList(List<Line> lineList) {
        this.lineList = lineList;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", KnifeReportTable.class.getSimpleName() + "[", "]")
                .add("detail=" + detail)
                .add("headerColumnList=" + headerColumnList)
                .add("lineColumnList=" + lineColumnList)
                .add("lineList=" + lineList)
                .toString();
    }
}
